import { ExecutionContext, createParamDecorator } from '@nestjs/common'

/**
 * 获取token的参数装饰器
 */
export const LvToken = createParamDecorator((data: unknown, ctx: ExecutionContext) => {
  const request = ctx.switchToHttp().getRequest()
  return request.headers.authorization
})
